<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>thymeleaf post_form demo</title>
</head>
<body>
<h1>表单提交</h1>

<form action="#" th:action="@{/reg}" method="post" th:object="${user}">
    <input type="text" th:field="*{id}" value="id"> <br>
    <input type="text" th:field="*{name}" value="name"> <br>
    <input type="text" th:field="*{age}" value="age"> <br>
    <button type="submit">GOGOGO</button>
</form>
</body>
</html>